package com.aeye.mbr.upms.dao.model;


import com.aeye.mbr.upms.common.constant.SmsDatabaseConstants;
import com.gitee.sunchenbin.mybatis.actable.annotation.DBColumn;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 短信发送日志
 */
@Table(name = SmsDatabaseConstants.TABLE_SMS_LOG)
public class SmsLog implements Serializable {



    public static final int STATUS_CREATED = 0;

    public static final int STATUS_SEND_SUCCESS = 1;

    public static final int STATUS_SEND_FAILED = 2;


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "SNOWFLAKE")
    @DBColumn(type = MySqlTypeConstant.BIGINT,length = 21,isKey = true)
    private Long id;


    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String mobile;

    /**
     * 模板内容(仅用来查看)
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 128)
    private String content;

    /**
     * 顶级组织ID
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 20)
    private Integer topOrgId;

    /**
     * SmsConfig#id
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 20)
    private Long smsConfigId;


    /**
     * 三方平台模板ID
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String templateId;


    /**
     * 模板类型
     */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String templateType;


    /**
     * 创建时间
     */
    @DBColumn(type = MySqlTypeConstant.DATETIME)
    private Date createTime;


    @DBColumn(type = MySqlTypeConstant.INT,length = 2)
    private Integer status;

    /**
     * 创建者
     */
    @DBColumn(type = MySqlTypeConstant.INT,length = 11)
    private Integer createUser;

    /**
     * ip地址
      */
    @DBColumn(type = MySqlTypeConstant.VARCHAR,length = 64)
    private String ip;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getTopOrgId() {
        return topOrgId;
    }

    public void setTopOrgId(Integer topOrgId) {
        this.topOrgId = topOrgId;
    }

    public Long getSmsConfigId() {
        return smsConfigId;
    }

    public void setSmsConfigId(Long smsConfigId) {
        this.smsConfigId = smsConfigId;
    }

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getTemplateType() {
        return templateType;
    }

    public void setTemplateType(String templateType) {
        this.templateType = templateType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Integer createUser) {
        this.createUser = createUser;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
}
